import { createStore,applyMiddleware,compose } from 'redux'
import thunk from 'redux-thunk'
import reducer from './rootReducer'
const enhancer = compose(
  applyMiddleware(thunk),
   (window && window .devToolsExtension) ? window .devToolsExtension() : (f) => f,
  )
const store = createStore(
  reducer,
  enhancer
  );
// reducer 要作为store的参数传入

export default store;